<div class="normal-table-wrap">
  <app-card-table-wrap [tableTitle]="'工单类型表格'" (reload)="reloadTable()" [btnTpl]="tableBtns">
    <nz-table
      #basicTable
      [nzShowTotal]="rangeTemplate"
      [nzData]="dataList"
      nzTableLayout="fixed"
    >
      <thead>
        <tr>
          <th nzColumnKey="name" [nzSortFn]="true">Name</th>
          <th>Valid</th>
          <th>Create By</th>
          <th>Create Time</th>
          <th>Change By</th>
          <th>Change Time</th>
          <th>Operate</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of dataList">
          <td (click)="edit(data.id)" class="operate-text">{{ data.name }}</td>
          <td>{{ data.validID }}</td>
          <td>{{ data.createBy }}</td>
          <td>{{ data.createTime }}</td>
          <td>{{ data.changeBy }}</td>
          <td>{{ data.changeTime }}</td>
          <td>
            <a>Action 一 {{ data.name }}</a>
            <nz-divider nzType="vertical"></nz-divider>
            <span class="operate-text" (click)="deleteOne(data.id)">删除</span>
          </td>
        </tr>
      </tbody>
    </nz-table>
  </app-card-table-wrap>
</div>
<ng-template #tableBtns>
  <button (click)="add()" nz-button nzType="primary" class="m-r-8">
    <i nz-icon nzType="plus"></i>
    新建
  </button>
</ng-template>
<ng-template #rangeTemplate let-range="range" let-total>{{ range[0] }}-{{ range[1] }} 共 {{ total }} 条</ng-template>